{% extends 'base.html' %}
{% load comments %}
{% block sidebar_trigger %}
  <a class="show-on-mobile nav-link m-5" id="js-sidebar-btn" href="#" role="button">
    <i class="fa fa-chevron-right" aria-hidden="true"></i>
  </a>
{% endblock sidebar_trigger %}
{% block units_gap %}{% endblock %}
{% block main %}
  <aside class="unit-1-4 unit-1-on-mobile top-gap">
    <div class="scroll-view bg-white card toc-sidebar" style="height: 100%">
      <div class="card-header">
        目录
      </div>
      <div class="card-body">
        <ul>
          <li>
            <h6 class="top-gap-0"><a href="">{{ post.category }}</a></h6>
            <ul>
              {% for tutorial_post in post_list %}
                <li>
                  <a href="{{ tutorial_post.get_absolute_url }}">{{ tutorial_post.title }}</a>
                  {% if tutorial_post.pk == post.pk %}
                    {{ post.toc |safe }}
                  {% endif %}
                </li>
              {% endfor %}
            </ul>
          </li>
        </ul>
      </div>
    </div>
  </aside>
{% endblock main %}
{% block side %}
  <div class="unit-3-4 unit-1-on-mobile top-gap">
    {% include 'blog/_tutorial_post_detail.html' %}
  </div>
{% endblock side %}